package me.kennylee.mobile.sms.code;

/**
 * <p> 短信通知类型的通知 </p>
 * <p>Created on 24/3/2018.</p>
 *
 * @author kennylee
 */
public class AlidayuMessageCodeSender extends AlidayuVerifyCodeSender {

    AlidayuMessageCodeSender(String apiKey, String apiSecret) {
        super(apiKey, apiSecret);
    }

    /**
     * <p>用来实现一些特殊的缓存情景</p>
     *
     * @param apiKey
     * @param apiSecret
     * @param templateCode
     * @param signName
     * @param mobileSmsCountCacheName
     * @param smsIntervalCacheName
     * @param codeLiveCacheName
     * @return
     */
    public static AlidayuMessageCodeSender of(String apiKey, String apiSecret, String templateCode, String signName
            , String mobileSmsCountCacheName, String smsIntervalCacheName, String codeLiveCacheName) {
        AlidayuMessageCodeSender o = new AlidayuMessageCodeSender(apiKey, apiSecret);
        o.templateCode = templateCode;
        o.signName = signName;
        o.mobileSmsCountCacheName = mobileSmsCountCacheName;
        o.smsIntervalCacheName = smsIntervalCacheName;
        o.codeLiveCacheName = codeLiveCacheName;
        return o;
    }
}
